import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeoutException;

public class Foreach {

    public static void main(String[] args) throws IOException, TimeoutException {

        List<Integer> arr = Arrays.asList(1,23,4,5,6,7,7,8);
        arr.parallelStream().forEach(a->{

            System.out.println(Thread.currentThread().getId());

        });


    }
}
